import Vue from 'vue'
import Router from 'vue-router'
import loginPage from '@/page/loginPage' //登录首页
import indexPage from '@/page/index' //首页
import chartPage from '@/page/chart'
//用户管理
import userPage from '@/page/user' //用户列表
import userLookPage from '@/page/userLook' //用户列表
//广告管理
import advertPage from '@/page/advert' //广告列表
import productPage from '@/page/product' //产品列表
import pageManagePage from '@/page/pageManage' //页面管理
import addPage from '@/page/addPage' //增加页面
import redactPage from '@/page/redactPage' //增加页面
//平台管理
import currencyPage from "@/page/currency" //币值管理
//应用管理
import appListPage from "@/page/appList" //应用列表
//安全管理
import operationPage from "@/page/operation" //操作日志
//系统管理
import adminPage from "@/page/admin" //管理员列表
import rolePage from "@/page/role" //角色管理
Vue.use(Router)

export default new Router({
    routes: [{
        path: '/',
        name: 'index',
        component: indexPage,
        redirect: '/chart',
        children: [{
            path: '/chart',
            name: 'chart',
            component: chartPage
        },
            {
                path: '/user',
                name: 'user',
                component: userPage
            },
            {
                path: '/userLook:id',
                name: 'userLook',
                component: userLookPage
            },
            {
                path: '/advert',
                name: 'advert',
                component: advertPage
            },
            {
                path: '/product',
                name: 'product',
                component: productPage
            },
            {
                path: '/pageManage',
                name: 'pageManage',
                component: pageManagePage
            },
            {
                path: '/addPage',
                name: 'addPage',
                component: addPage
            },
            {
                path: '/redactPage:id',
                name: 'redactPage',
                component: redactPage
            },
            {
                path: '/currency',
                name: 'currency',
                component: currencyPage
            },
            {
                path: '/appList',
                name: 'appList',
                component: appListPage
            },
            {
                path: '/operation',
                name: 'operation',
                component: operationPage
            },
            {
                path: '/admin',
                name: 'admin',
                component: adminPage
            },
            {
                path: '/role',
                name: 'role',
                component: rolePage
            },
        ]
    },
        {
            path: '/loginPage',
            name: 'loginPage',
            component: loginPage
        },
    ]
})
